package com.cskaoyan.controller;

import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.bean.ListData;
import com.cskaoyan.bean.vo.DeliveryAddress;
import com.cskaoyan.service.AddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 杨杰
 * @version V1.0
 * @Package com.cskaoyan.controller
 * @date 2020/12/5 17:21
 * @Copyright © 暂时还没有
 */
@RestController
@RequestMapping("admin/address")
public class AdminAddressController {

    @Autowired
    AddressService addressService;

    @RequestMapping("list")
    public BaseRespVo queryAddressList
            (Integer page, Integer limit, String sort, String order,Integer userId,String name){
        ListData<DeliveryAddress> listData = addressService.queryAddressList(page,limit,sort,order,userId,name);
        return BaseRespVo.ok(listData);
    }
}
